import {
    totalConfig,
    propName
} from 'server/config/templateConfig';
let playerConfig = totalConfig.player[100000];

//角色基础信息
class BasicInfo {
    static getInstance() {
        if (!BasicInfo.instance) {
            BasicInfo.instance = new BasicInfo();
        }
        return BasicInfo.instance;
    }

    create(opts) {
        opts = opts || {};
        return {
            name: opts.name,
            money: opts.money || 0,
            gold: opts.gold || 0,
            lvl: opts.lvl || 1,
            exp: opts.exp || 0,
            skills: opts.skills || playerConfig.initSkills.slice(),
            mapId: opts.mapId || 110101, //1家2村庄3城镇4冒险地图
            mapType: opts.mapType || 5, //1家2村庄3城镇4世界地图5冒险地图
            mainTaskId: opts.mainTaskId || 1, //主线任务id
            logShow: opts.logShow || false,
            bagShow: opts.bagShow || false,
            partnerIndex: opts.partnerIndex || 1,
            tili: opts.tili || 200, //体力
            lucky: opts.lucky || 0, //饥饿,
            collectionLvl: opts.collectionLvl || 1, // 采集等级
            cutLvl: opts.cutLvl || 1, // 采伐等级
            miningLvl: opts.miningLvl || 1, // 采矿等级
            fishingLvl: opts.fishingLvl || 1, // 钓鱼等级
            adventureState: opts.adventureState || 1 //1开始冒险2正在冒险
        }

    }
}

export default BasicInfo.getInstance();